package ruifeng.zcj.dig.ui.forum.talk;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import org.greenrobot.eventbus.EventBus;

import butterknife.Bind;
import ruifeng.zcj.dig.R;
import ruifeng.zcj.dig.groble.FragmentArgs;
import ruifeng.zcj.dig.ui.forum.category.bean.FirstGrade;
import ruifeng.zcj.dig.ui.forum.category.bean.TwoGrade;
import ruifeng.zcj.mybase.base.BaseActivity;

/**
 * 今日杂谈
 * Created by Administrator on 2016/10/24 0024.
 */
public class TalkActivity extends BaseActivity {
    @Bind(R.id.activity_top_left)
    ImageView mActivityTopLeft;
    @Bind(R.id.activity_top_center)
    TextView mActivityTopCenter;
    @Bind(R.id.activity_top_right)
    ImageView mActivityTopRight;
    @Bind(R.id.activity_top_right_text)
    TextView mActivityTopRightText;



    @Override
    public int getLayoutId() {
        return R.layout.talk_activity;
    }

    @Override
    public void initView() {
        mActivityTopCenter.setText("论坛");
        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            FragmentArgs args = (FragmentArgs) bundle.get("gradsBundle");
            TwoGrade category = (TwoGrade) args.get("twograds");
            FirstGrade mFirstGrade = (FirstGrade) args.get("gradest");
            if (mFirstGrade != null){
                mActivityTopCenter.setText(""+mFirstGrade.getName());
            }
            EventBus.getDefault().post(category);// 不需要关闭acitivity
        }
    }

}
